package com.dc;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@SpringBootApplication
@EnableDiscoveryClient
@RestController
public class FireNacosGatewayApplication {

    public static void main(String[] args) {
        SpringApplication.run(FireNacosGatewayApplication.class, args);
    }

    @RequestMapping(value = "/fallbackcontroller")
    public Map<String, Object> fallBackController() {
        Map<String, Object> res = new HashMap();
        res.put("code", -100);
        res.put("message","网络错误");
        res.put("data", new HashMap<>());
        return res;
    }

}
